package com.sbpm.crmbpm.shared.data.organisation;

import javax.persistence.*;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Entity
@Table( name = "ROLE" )
public class Role implements Serializable
{
    @Id
    @Column( name = "ROLE_ID" )
    private String roleId;

    @Column( name = "DESCRIPTION" )
    private String description;

    @Column( name = "SOURCE_SYSTEM" )
    private String sourceSystem;

    @OneToMany( fetch = FetchType.LAZY, mappedBy = "role" )
    private List<UserRoleRel> users = new ArrayList<UserRoleRel>();

    public String getRoleId()
    {
        return roleId;
    }

    public void setRoleId( String roleId )
    {
        this.roleId = roleId;
    }

    public String getDescription()
    {
        return description;
    }

    public void setDescription( String description )
    {
        this.description = description;
    }

    public String getSourceSystem()
    {
        return sourceSystem;
    }

    public void setSourceSystem( String sourceSystem )
    {
        this.sourceSystem = sourceSystem;
    }

    public List< UserRoleRel > getUsers()
    {
        return users;
    }

    public void setUsers( List< UserRoleRel > users )
    {
        this.users = users;
    }
}
